<?php
namespace app\admin\controller;
use app\admin\model\Type;

class Types extends Base
{
    /**
     * 场次详情列表
     * @return \think\response\View
     */
    public function index(Type $type)
    {
        $list = $type->select();
        $this->assign('list',$list);
        return view();
    }

    /**
     * 修改赔率
     */
    public function modprecent(Type $type)
    {
        $data = input();
        if(empty($data['id']) || empty($data['peilv'])) {
            return $this->param_error();
        }
        $type->where('id',$data['id'])->update(['peilv'=>$data['peilv']]);
        return $this->returnOk();
    }
}
